#pragma once
#include "DllExport.h"
#include <queue>
#include <vector>
#include "Listener.h"
#include <Windows.h>
namespace NBGUI
{
	enum InputType//devices
	{
		MOUSE = 0,
		KEYBOARD,
		JOYSTICK
	};
	class GUIAPI Input
	{
	public:
		Input(InputType t);
		virtual ~Input();
		virtual void update()=0;
		virtual void processMessages(UINT message, WPARAM wParam, LPARAM lParam)=0;
		unsigned int addEvent(Event* theEvent);
		InputType getType();
		void handleAllEvents();
		void registerListener(Listener* lsn);
		void unRegisterListener(Listener* lsn);

	private:
		std::queue<Event*> m_eventQue;
		InputType m_inputType;
		std::vector<Listener*> m_listener;
	};
}